package com.cmower.baeldung.string1;

public class ComparisonStringDemo {
    public static void main(String[] args) {
String string1 = "沉默王二";
String string2 = "沉默王二";
String string3 = new String("沉默王二");

System.out.println(string1.equals(string2));
System.out.println(string1.equals(string3));

System.out.println(string1 == string2);
System.out.println(string1 == string3);
    }
}
